package com.acrm.client.entity.global;

import java.io.Serializable;

/*
 * 该对象附带着查询参数。
 * 某些服务中的方法，需要该对象做为参数。
 * 以便排序等。如orderby
 * 建议所有继承该类的子类在构造方法中添加orderBy的默认值,且最好为一个表的主键
 */
public class BaseSearcher implements Serializable{

	private static final long serialVersionUID = -7499793327824603712L;
	
	private Integer startRow = 0;
	private Integer pageSize = 10;
	private String status=Status.ALLSTATUS;
	private String sortOrder = SortOrder.DEF;
	private String orderBy;
	
	public Integer getStartRow() {
		return startRow;
	}
	public void setStartRow(Integer startRow) {
		this.startRow = startRow;
	}
	public Integer getPageSize() {
		return pageSize;
	}
	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public String getOrderBy() {
		return orderBy;
	}
	public void setOrderBy(String orderBy) {
		this.orderBy = orderBy;
	}
	public String getSortOrder() {
		return sortOrder;
	}
	public void setSortOrder(String sortOrder) {
		this.sortOrder = sortOrder;
	}

	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	
	@Override
	public String toString() {
		return "Sort Condition:startRow:"+startRow+" pageSize:"+pageSize+" sortOrder:"+sortOrder+" orderBy:"+orderBy+" status:"+status;
	}
	
}
